(function(angular) {
	"use strict";
	angular.module("fs.waf").controller("cls.payDda.fileViewController", fileViewController);
	fileViewController.$inject = [ "$scope", "$q", "layoutConfig", "validatorConfig", "authService", "payDdaService" ];
	function fileViewController($scope, $q, layoutConfig, validatorConfig, authService, payDdaService) {
		var ctrl = this, payDdaFileInfo = $scope.$stateParams.params;
		ctrl.validatorConfig = validatorConfig;

		ctrl.init = function() {
			payDdaService.getCurrencyOptions().then(function(response) {
				return $q(function(resolved, rejected) {
					ctrl.currencyOptions = response;
					resolved();
				});
			}).then(function() {
				authService.view(payDdaFileInfo).then(function(response) {
					ctrl.layoutConfig = layoutConfig;
					ctrl.payDdaFile = response.data || payDdaFileInfo;
				}, angular.noop);
			});

		};
	}
})(angular);